package com.naiterui.ehp.bs.esign.entity.mysql;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * 电子签名用户-医生用户
 *
 * @author guoyongxiang
 * @date 2019-07-31 10:51
 * @since 1.0.0
 */
@Data
@Table(name = "recom_esign_doctor")
@Entity
public class EsignDoctor {


    /**
     * 用户认证状态-未认证
     */
    public static final Integer AUTH_STATUS_DEF = 0;
    /**
     * 用户认证状态-通过
     */
    public static final Integer AUTH_STATUS_PASS = 1;
    /**
     * 用户认证状态-不通过
     */
    public static final Integer AUTH_STATUS_NOT_PASS = 2;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * CMS中的用户名
     */
    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * OPEN_ID
     */
    @Column(name = "open_id")
    private String openId;

    /**
     * 用户姓名
     */
    @Column(name = "name")
    private String name;

    /**
     * 手机号
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 身份证号
     */
    @Column(name = "id_card")
    private String idCard;

    /**
     * 签章图片地址
     */
    @Column(name = "seal_image")
    private String sealImage;

    /**
     * 用户认证状态(0:待审核, 1:通过, 2:不通过)
     */
    @Column(name = "auth_status")
    private Integer authStatus;

    @Column(name = "reason")
    private String reason;

    /**
     * 意愿签署方式
     */
    @Column(name = "will_type")
    private String willType;

    /**
     * 签名密码
     */
    @Column(name = "auth_pwd")
    private String authPwd;

    /**
     * 是否免密 0.否 1.是
     */
    @Column(name = "no_secret")
    private Integer noSecret;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;
}
